FILE(GLOB CPPFILES *.cpp)


FOREACH(CPPFILE ${CPPFILES})
  GET_FILENAME_COMPONENT(FILENAME ${CPPFILE} NAME_WE)
  ADD_LIBRARY(${FILENAME} MODULE ${CPPFILE})
  TARGET_LINK_LIBRARIES(${FILENAME} ${MPI_CXX_LIBRARIES})
  INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH} 
                      ${CMAKE_SOURCE_DIR}/src/bamglib
                      ${CMAKE_SOURCE_DIR}/src/Graphics
                      ${CMAKE_SOURCE_DIR}/src/femlib
                      ${CMAKE_SOURCE_DIR}/src/fflib)
  SET_TARGET_PROPERTIES(${FILENAME} PROPERTIES PREFIX "")
ENDFOREACH(CPPFILE)

